Validate a bid coming from the Builder API (Gloas) - #11260
StefanBratanov wants to merge 4 commits into
Conversation
|
reviewed this PR myself and it looked alright to me, but ran a sanity check on claude and it came back with a few things: I was keen to collab on this PR or a next one if you don't mind |
|
@gfukushima feel free to push to this PR with the changes suggested, I wouldn't work on it if you want? |
83d83ac to
9b822b4
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9b822b4. Configure here.
| LOG.warn("Bid rejected: gas limit {} is not compatible with target", bid.getGasLimit()); | ||
| return false; | ||
| } | ||
| } |
There was a problem hiding this comment.
Missing preferences skip fee checks
High Severity
When proposerPreferencesManager has no entry for the slot, validateBid skips both the fee_recipient and gas-limit checks and still accepts the bid. Builder-specs validate_bid asserts those fields unconditionally, and the gossip path defers instead of accepting. A builder can then win selection with the wrong fee recipient, and the proposer includes that bid.
Reviewed by Cursor Bugbot for commit 9b822b4. Configure here.
| && !bid.getParentBlockHash().equals(stateGloas.getLatestBlockHash())) { | ||
| LOG.warn("Bid rejected: parent block hash does not extend a known parent"); | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Wrong-parent builder bids accepted
Medium Severity
validateBid accepts a parent hash matching either latest_execution_payload_bid.block_hash or latest_block_hash, and neither the fetcher nor the selector requires the bid to match the production parentHash/parentRoot. After an empty slot those hashes diverge, so a high-value bid on the unrevealed payload can be selected and then fail process_execution_payload_bid.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 9b822b4. Configure here.
9b822b4 to
1186246
Compare
|
Close in favour of #11279 |


PR Description
Implements the rules as per https://github.com/ethereum/builder-specs/blob/main/specs/gloas/validator.md#validating-a-signedexecutionpayloadbid and filters out any bids which fail validation. (warn message is logged in this case)
Fixed Issue(s)
fixes #11191
Documentation
doc-change-requiredlabel to this PR if updates are required.Changelog
Note
Medium Risk
Changes which builder bids are accepted for block production and aligns on-chain bid signature checks with the configured BLS verifier; incorrect validation could reject valid bids or accept invalid ones, though coverage is added in unit tests.
Overview
Adds Gloas Builder API bid validation so execution payload bids from configured builders are checked against the validator spec before use. Invalid bids are dropped with warn logs.
Introduces
BuilderBidValidator(active builder, slot, parent hash/root,prev_randao, optional proposer fee recipient and gas-limit compatibility, collateral, BLS signature).BuilderBidFetcherruns this after each HTTP fetch and short-circuits when no builders are configured.BeaconChainControllerwires the validator into the fetcher.Signature verification now uses the spec’s
getBLSSignatureVerifier()in Gloas block processing and in bid validation (replacingBLSSignatureVerifier.SIMPLEinBlockProcessorGloas).ExecutionPayloadBidSelectoralso appliesmin_bidto builder API bids.isGasLimitTargetCompatibleis shared publicly from gossip validation for proposer-preference checks.Reviewed by Cursor Bugbot for commit 9b822b4. Bugbot is set up for automated code reviews on this repo. Configure here.